package com.github.catvod.spider.merge;

import java.io.OutputStream;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;

/* loaded from: classes.dex */
public class lW extends RN {

    class Tw extends OutputStream {
        final /* synthetic */ StringBuilder h;

        Tw(StringBuilder sb) {
            this.h = sb;
        }

        @Override // java.io.OutputStream
        public void write(int i) {
            this.h.append((char) i);
        }
    }

    public lW() {
        this(true);
    }

    @Override // com.github.catvod.spider.merge.RN
    /* renamed from: V0 */
    public pt I(Class<?> cls) {
        return new u(cls);
    }

    public lW(boolean z) {
        super("Slf4j");
        h(bv.class);
        if (z) {
            StringBuilder sb = new StringBuilder();
            PrintStream printStream = System.err;
            try {
                System.setErr(new PrintStream((OutputStream) new Tw(sb), true, "US-ASCII"));
                try {
                    if (bv.W() instanceof l6) {
                        throw new NoClassDefFoundError(sb.toString());
                    }
                    printStream.print(sb);
                    printStream.flush();
                } finally {
                    System.setErr(printStream);
                }
            } catch (UnsupportedEncodingException e) {
                throw new Error(e);
            }
        }
    }
}
